package router

import (
	"bugManagementPlatform/controller"
	"bugManagementPlatform/variable"
)

type BugManagementRoute struct {
	BugManagementController *controller.BugManagementController
}

func NewBugManagementRoute() *BugManagementRoute {
	return &BugManagementRoute{
		BugManagementController: controller.NewBugManagementController(),
	}
}

func (bmr *BugManagementRoute)RouteInit() {
	//variable.Server.POST("/editHomePageDetails", bmr.BugManagementController)

	filed := variable.Server.NewGroupPath("/filed")
	//filed.UseBefore(middleware.JWTAuthMiddleware)
	filed.POST("/queryFiledAll/{pageNo}/{pageSize}/{id}", bmr.BugManagementController.QueryFiledAll)
	filed.POST("/addFiled", bmr.BugManagementController.AddFiled)
	filed.POST("/updateFiled", bmr.BugManagementController.UpdateFiled)
	filed.POST("/deleteFiledById", bmr.BugManagementController.DeleteFiledById)
	filed.GET("/viewReportById", bmr.BugManagementController.ViewReportById)

	login := variable.Server.NewGroupPath("/login")
	login.POST("/login", bmr.BugManagementController.Login)
}






